Skip to content

Conversation

@vincent0426
Copy link

Include "Accept": "application/json" for exchange token and refresh token to avoid exception

token_response = OAuthToken.model_validate_json(content)

token_response = OAuthToken.model_validate_json(content)

Motivation and Context

Closes #1523

How Has This Been Tested?

added unit test for headers

Breaking Changes

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)
  • Documentation update

Checklist

  • I have read the MCP Documentation
  • My code follows the repository's style guidelines
  • New and existing tests pass locally
  • I have added appropriate error handling
  • I have added or updated documentation as needed

Additional context

@felixweinberger felixweinberger added bug Something isn't working auth Issues and PRs related to Authentication / OAuth labels Oct 29, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

auth Issues and PRs related to Authentication / OAuth bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

OAuthClientProvider._handle_token_response expect json

2 participants